package com.xp.dto.flow;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 流程查询请求DTO
 * 
 * @author xp
 * @since 2025-01-01
 */
@Data
@Schema(description = "流程查询请求DTO")
public class FlowQueryRequest {

    @Schema(description = "流程编码（模糊查询）", example = "user")
    private String flowCode;

    @Schema(description = "流程名称（模糊查询）", example = "用户")
    private String flowName;

    @Schema(description = "流程分类", example = "用户管理")
    private String category;

    @Schema(description = "状态列表", example = "[0, 1]")
    private List<Integer> statusList;

    @Schema(description = "执行状态", example = "RUNNING")
    private String status;

    @Schema(description = "版本号", example = "1.0.0")
    private String version;

    @Schema(description = "链路追踪ID", example = "trace-12345")
    private String traceId;

    @Schema(description = "应用名称", example = "ai-backend")
    private String applicationName;

    @Schema(description = "执行者ID", example = "1")
    private Long executorId;

    @Schema(description = "创建人ID", example = "1")
    private Long creatorId;

    @Schema(description = "开始时间范围-起始", example = "2025-01-01T00:00:00")
    private LocalDateTime startTimeBegin;

    @Schema(description = "开始时间范围-结束", example = "2025-01-31T23:59:59")
    private LocalDateTime startTimeEnd;

    @Schema(description = "结束时间范围-起始", example = "2025-01-01T00:00:00")
    private LocalDateTime endTimeBegin;

    @Schema(description = "结束时间范围-结束", example = "2025-01-31T23:59:59")
    private LocalDateTime endTimeEnd;

    @Schema(description = "创建时间开始", example = "2025-01-01T00:00:00")
    private LocalDateTime createTimeStart;

    @Schema(description = "创建时间结束", example = "2025-01-31T23:59:59")
    private LocalDateTime createTimeEnd;

    @Schema(description = "页码", example = "1")
    private Integer pageNum = 1;

    @Schema(description = "每页大小", example = "10")
    private Integer pageSize = 10;

    @Schema(description = "排序字段", example = "createTime")
    private String orderBy = "createTime";

    @Schema(description = "排序方向", example = "desc", allowableValues = {"asc", "desc"})
    private String orderDirection = "desc";
}